package com.xsomnus.grpc.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author @xsomnus666_xiawenye★
 * @since 2019/7/3 0003 10:01
 * - 才需学也,学需静也/非淡泊无以明志，非宁静无以致远
 */
@RestController
public class GrpcClientController {

    @Autowired
    private GrpcClientService grpcClientService;


    @RequestMapping("/test")
    public String message(@RequestParam(defaultValue = "xsomnus") String name) {
        return grpcClientService.sendMessage(name);
    }

}
